package com.zq.product.controller;


import com.zq.common.util.Result;
import com.zq.product.dao.entity.ProductUnit;
import com.zq.product.service.IProductUnitService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品sku属性表 前端控制器
 * </p>
 *
 * @author 张乔
 * @since 2025-05-13
 */
@RestController
@RequestMapping("/product/product-unit")
public class ProductUnitController {

    @Resource
    private IProductUnitService productUnitService;

    @GetMapping("/getAll")
    public Result<List<ProductUnit>> getAll(){
        List<ProductUnit> productUnitList = productUnitService.list();
        return Result.successData(productUnitList);
    }



}
